import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

class WordCount {

    private final static Pattern PATTERN;

    static {
        PATTERN = Pattern.compile("[a-z|0-9]+");
    }

    Map<String, Integer> phrase(final String inputString) {
        String iString = inputString.toLowerCase();
        Matcher matcher = WordCount.PATTERN.matcher(iString);
        Map<String, Integer> phraseMap = new HashMap<>();

        while (matcher.find()) {
            String key = matcher.group();
            phraseMap.put(key, phraseMap.getOrDefault(key, 0) + 1);
        }

        return phraseMap;
    }
}